package mpcs.view.components
{
	import flash.events.ProgressEvent;
	
	import mx.preloaders.DownloadProgressBar;
	
	/**
	 *  自定义进度条
	 * @author zhangzuoqiang
	 */
	public class MyDownloadProgressBar extends DownloadProgressBar {
		
		public function MyDownloadProgressBar() {
			super();
			// Set the download label. 
			downloadingLabel="系统启动 ...";
			// Set the initialization label.  
			initializingLabel="系统初始化 ...";
		}
		
		// Override to return true so progress bar appears during initialization.
		override protected function showDisplayForInit(elapsedTime:int, count:int):Boolean {
			return true;
		}
		
		// Override to return true so progress bar appears during download.
		override protected function showDisplayForDownloading(elapsedTime:int, event:ProgressEvent):Boolean {
			return true;
		}
		
		// Override initialize so that we can position the loader
		override public function initialize():void {
			super.initialize();
			//如果屏幕高度超过250 pixels，就以250 pixels高度居中，如果屏幕高度低于250 pixels就以实际高度居中。
			center(stageWidth, (stageHeight > 250) ? 250 : stageHeight);
		}
		// 无线适配器或访问点有问题
		
		
	}
}